package com.example.emos.api.service.impl;

import com.example.emos.api.db.dao.TbHomeDao;
import com.example.emos.api.db.pojo.TbHome;
import com.example.emos.api.service.HomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;

@Service
public class HomeServiceImpl implements HomeService {
    @Autowired
    private TbHomeDao tbHomeDao;

    @Override
    public int insert(TbHome tbHome) {
        return tbHomeDao.insert(tbHome);
    }

    @Override
    public ArrayList<HashMap> searchAllHome() {
       ArrayList<HashMap> list=tbHomeDao.searchAllHome();
        return list;
    }

    @Override
    public int updateByPrimaryKeySelective(TbHome param) {
        return tbHomeDao.updateByPrimaryKeySelective(param);
    }
}
